package cn.itcast.lock;
 
public class Test {
 
    /**
     * @param args
     * @throws InterruptedException 
     */
    public static void main(String[] args) throws InterruptedException {
 
        Ticket ticket=new Ticket();
        
        // 　实例化几个抢票用户
        Thread mary = new Thread(ticket, "玛丽");
        
        mary.sleep(100);
        
        Thread jack = new Thread(ticket, "杰克");
 
        mary.start();
 
        jack.start();
 
    }
}